package controller.home;

import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.swing.JOptionPane;
import view.Home;

public class HomeWindowsController extends WindowAdapter {
	
	private Home home;
	
	public HomeWindowsController(Home home){
		this.home = home;
	}
	@Override
	public void windowClosing(WindowEvent e) {
		if(JOptionPane.showConfirmDialog(home, "Do you want to exit?", "Exit", JOptionPane.OK_CANCEL_OPTION) == JOptionPane.OK_OPTION){
			
		}else{
			home.setDefaultCloseOperation(Home.DO_NOTHING_ON_CLOSE);
		}
	}
	
	
}
